<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script language="javascript">
function ouputcsv()
{
	$("#if_csv").val(1);
	$("#search").submit();
}

</script>
<title>销量查询</title>
<body class="withvernav">
<div class="bodywrapper">
    {{include file='/public/leftmenu.tpl'}}
    <div class="centercontent tables">
        <div class="pageheader notab">
            <h1 class="pagetitle">销量查询</h1>
            <span class="pagedesc"></span>
        </div>
        <!--pageheader-->

        <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
        <div id="contentwrapper" class="contentwrapper">
            <!--搜索栏-->
            <form class="stdform stdform2" method="get" name="search" id="search" action="/product/goodssale">
              <input type='hidden' name='if_csv' id='if_csv'>
                <div class="tableoptions">

                    商品编号: <input type="text" name="other" id="other" class="width100" placeholder="请输入商品编号" value="{{$other}}" />
                    统计时间：<input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" onBlur="showcountry()" /> - <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
                                        国家中文
                    <input type="text"  name="country" value="{{$country}} " class="width100 " />
                    <button class="btn btn_orange btn_search radius50">Search</button>
                    
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <button onClick="ouputcsv()" class="stdbtn btn_black">订单导出</button>
                </div>
            </form>
            <!--搜索栏结束-->

            <table cellpadding="0" cellspacing="0" border="0" class="stdtable">
                <thead>
                <tr>
                    <th class="head0">商品编号</th>
                    <th class="head1">名称</th>
                    {{if $starttime && $endtime}}
                    	<th class="head0">{{$starttime}}-{{$endtime}}[计：{{$allday}}]</th>
                    {{/if}}
                    <th class="head0">7天销量</th>
                    <th class="head0">30天销量</th>
                    <th class="head1">60天销量</th>
                    {{if $starttime && $endtime}}
                    	<th class="head0">FBA{{$starttime}}-{{$endtime}}[计：{{$allfabday}}]</th>
                    {{/if}}
                     <th class="head0">FBA7天销量</th>
                    <th class="head0">FBA30天销量</th>
                    <th class="head1">FBA60天销量</th>
                </tr>
                </thead>
                <tbody>
                {{foreach from=$list item=li key=key}}
                <tr>
                    <td><a href="/product/showproduct?goods_id={{$li.goods_id}}" target="_blank">{{$li.goods_sku}}</a></td>
                    <td>{{$li.goods_name}}</td>
                     {{if $starttime && $endtime}}
                    	<td><B>{{$li.allday1}}</B></td>
                    {{/if}}
                    <td>{{$li.sales1}}</td>
                    <td>{{$li.sales2}}</td>
                    <td>{{$li.sales3}}</td>
                     {{if $starttime && $endtime}}
                    	<td><B>{{$li.allfbaday1}}</B></td>
                    {{/if}}
                     <td>{{$li.fbasale1}}</td>
                    <td>{{$li.fbasale2}}</td>
                    <td>{{$li.fbasale3}}</td>
                </tr>
                {{/foreach}}
                </tbody>

            </table>
            <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
            <br />
            <br />
        </div>
    </div>
  
</body>
</html>